home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / games / nerak2.zip / MANGER.SCR < prev    next >
Text File  |  1994-07-10  |  2KB  |  67 lines

  1. !
  2. ! Manger Script
  3. !
  4. ! Karen Scites, 1994
  5. !
  6. !------------------------------------------------------------------------!
  7. :@TALK ! Talk to the character !
  8. !------------------------------------------------------------------------!
  9.  
  10.   if player.hp = 0 then
  11.     writeln( player.name, " is dead!" );
  12.     STOP;
  13.   endif;
  14.  
  15.   if npc.picture >= 0 then
  16.     viewpcx(npc);
  17.   endif;
  18.  
  19. ! First, say hello.. !
  20.   if NPC.V0 > 0 then
  21.     writeln( "Hello ", player.name, ". What brings you back?" );
  22.   else
  23.     writeln( "Hello. I am ", npc.name, ". Have you heard the Good News?" );
  24.   endif;
  25.  
  26. ! Now, set some variables..
  27.   NPC.V0 = 1; ! From know on, remember we've been here
  28.  
  29. :LOOP
  30.   L3 = getstr("Bye");
  31.   if L3 = -1 then 
  32.     writeln( "Ok." );
  33.     goto XSTOP;
  34.   endif;
  35.  
  36. ! First, see if the keyword typed is in the character's text block !
  37.   if dotext( S0 ) then
  38.     if L3 = 3 goto XSTOP;
  39.     goto LOOP;
  40.   endif;
  41.  
  42. ! It didn't, so try the predefined ones..
  43.   on L3 goto CSTOP;
  44.  
  45. ! Nope, try a 'DEFAULT' line
  46.   if not dotext( "DEFAULT" ) then
  47.     writeln( "God sent His Son Jesus to save us from our sins!" );
  48.     writeln( "John 3:16.");
  49.   endif;
  50.   goto LOOP;
  51.  
  52.  
  53. :CSTOP
  54.   writeln( "Nice talking to you.." );
  55.   goto XSTOP;
  56.  
  57. ! Feel free to expand on this list.. !
  58.  
  59. !-----------------------------------------------------------------!
  60. ! All STOPs now lead here so the screen can be restored if needed !
  61. !-----------------------------------------------------------------!
  62. :XSTOP
  63.   if npc.picture >= 0 then
  64.     paint(window); ! Assumes the picture fits in the window !
  65.   endif;
  66.   STOP;
  67.